﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<SolidColorBrush x:Key="LightWindowBackground" Color="#FFF0F0F0"/>
	<SolidColorBrush x:Key="LControlBackground" Color="#FFDFDEDE"/>
	<SolidColorBrush x:Key="LControlForeground" Color="#FF050505"/> <!-- Color="#FF050505" -->
		<LinearGradientBrush x:Key="LBtnBackgNormal" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFF3F3F3" Offset="0"/>
		<GradientStop Color="#FFD8D5D5" Offset="0.5"/>
		<GradientStop Color="#FFD1D1D1" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="LBtnBackgOver" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFE3E3E3" Offset="0"/>
		<GradientStop Color="#FFC8C5C5" Offset="0.5"/>
		<GradientStop Color="#FFC1C1C1" Offset="1"/>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="LBtnBackgPressed" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFD1D1D1" Offset="0"/>
		<GradientStop Color="#FFD1D1D1" Offset="0.5"/>
		<GradientStop Color="#FFD1D1D1" Offset="1"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="LControlStrokeNormal" Color="#FF3E3E3E"/>
	<SolidColorBrush x:Key="LControlStrokeFocused" Color="#FF0000FF"/>
	<SolidColorBrush x:Key="LControlStrokeChecked" Color="#FF000000"/>
	<SolidColorBrush x:Key="LControlStrokeUnchecked" Color="#FF8D8D8D"/>
	<TextFormattingMode x:Key="TxtFormatMode">Display</TextFormattingMode>
	<DropShadowEffect x:Key="BtnFxNormal" BlurRadius="2" ShadowDepth="1" Opacity="0.395"/>
	<DropShadowEffect x:Key="BtnFxPressed" BlurRadius="2" ShadowDepth="0" Opacity="0.395"/>
	<SolidColorBrush x:Key="LPaletteStrokeNormal" Color="#FF8E8E8E"/>

	<Style x:Key="LightButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="StoryBtnMouseOver">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Fill">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LBtnBackgOver}"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Effect">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BtnFxNormal}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryBtnMousePressed">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Fill">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LBtnBackgPressed}"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Effect">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BtnFxPressed}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryBtnFocused">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LControlStrokeFocused}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryBtnUnfocused">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LControlStrokeNormal}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryBtnDisabled">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Fill">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LightWindowBackground}"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="bntRectangle" Storyboard.TargetProperty="Effect">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BtnFxPressed}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseOver"/>
								<VisualState x:Name="Pressed"/>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="InvalidFocused"/>
								<VisualState x:Name="InvalidUnfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="bntRectangle" Effect="{StaticResource BtnFxNormal}" RadiusY="3" RadiusX="3" StrokeThickness="0.5" Fill="{StaticResource LBtnBackgNormal}" Stroke="{StaticResource LControlStrokeNormal}"/>
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True">
							<Trigger.ExitActions>
								<BeginStoryboard x:Name="StoryBtnUnfocused_BeginStoryboard" Storyboard="{StaticResource StoryBtnUnfocused}"/>
							</Trigger.ExitActions>
							<Trigger.EnterActions>
								<BeginStoryboard x:Name="StoryBtnFocused_BeginStoryboard" Storyboard="{StaticResource StoryBtnFocused}"/>
							</Trigger.EnterActions>
						</Trigger>
						<Trigger Property="IsDefaulted" Value="True"/>
						<Trigger Property="IsMouseOver" Value="True">
							<Trigger.ExitActions>
								<StopStoryboard BeginStoryboardName="StoryBtnMouseOver_BeginStoryboard"/>
							</Trigger.ExitActions>
							<Trigger.EnterActions>
								<BeginStoryboard x:Name="StoryBtnMouseOver_BeginStoryboard" Storyboard="{StaticResource StoryBtnMouseOver}"/>
							</Trigger.EnterActions>
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Trigger.ExitActions>
								<StopStoryboard BeginStoryboardName="StoryBtnMousePressed_BeginStoryboard"/>
							</Trigger.ExitActions>
							<Trigger.EnterActions>
								<BeginStoryboard x:Name="StoryBtnMousePressed_BeginStoryboard" Storyboard="{StaticResource StoryBtnMousePressed}"/>
							</Trigger.EnterActions>
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Trigger.ExitActions>
								<StopStoryboard BeginStoryboardName="StoryBtnDisabled_BeginStoryboard"/>
							</Trigger.ExitActions>
							<Trigger.EnterActions>
								<BeginStoryboard x:Name="StoryBtnDisabled_BeginStoryboard" Storyboard="{StaticResource StoryBtnDisabled}"/>
							</Trigger.EnterActions>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="LightTextBoxStyle" TargetType="{x:Type TextBox}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TextBox}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="StoryTxtFocused">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="txtRectangle" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LControlStrokeFocused}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryTxtUnfocused">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="txtRectangle" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LControlStrokeNormal}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Disabled"/>
								<VisualState x:Name="ReadOnly"/>
								<VisualState x:Name="MouseOver"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="InvalidFocused"/>
								<VisualState x:Name="InvalidUnfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="txtRectangle" Fill="{StaticResource LControlBackground}" RadiusY="3" RadiusX="3" Stroke="{StaticResource LControlStrokeNormal}" StrokeThickness="0.5"/>
						<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True">
							<Trigger.ExitActions>
								<BeginStoryboard x:Name="StoryTxtUnfocused_BeginStoryboard" Storyboard="{StaticResource StoryTxtUnfocused}"/>
							</Trigger.ExitActions>
							<Trigger.EnterActions>
								<BeginStoryboard Storyboard="{StaticResource StoryTxtFocused}"/>
							</Trigger.EnterActions>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="LightPaletteButtonStyle" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="StoryNormal">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="toggleRectangle" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LPaletteStrokeNormal}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryMouseOver">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="toggleRectangle" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LControlStrokeFocused}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryPressed">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="toggleRectangle" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LPaletteStrokeNormal}"/>
							</ObjectAnimationUsingKeyFrames>
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="toggleRectangle" Storyboard.TargetProperty="Effect">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BtnFxPressed}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseOver"/>
								<VisualState x:Name="Pressed"/>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="InvalidFocused"/>
								<VisualState x:Name="InvalidUnfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="toggleRectangle" Stroke="{DynamicResource LPaletteStrokeNormal}" Effect="{DynamicResource BtnFxNormal}" Fill="{TemplateBinding Background}" RadiusY="3" RadiusX="3" StrokeThickness="0.5"/>
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsFocused" Value="True"/>
						<Trigger Property="IsDefaulted" Value="True"/>
						<Trigger Property="IsMouseOver" Value="True">
							<Trigger.ExitActions>
								<StopStoryboard BeginStoryboardName="StoryMouseOver_BeginStoryboard"/>
							</Trigger.ExitActions>
							<Trigger.EnterActions>
								<BeginStoryboard x:Name="StoryMouseOver_BeginStoryboard" Storyboard="{StaticResource StoryMouseOver}"/>
							</Trigger.EnterActions>
						</Trigger>
						<Trigger Property="IsPressed" Value="True"/>
						<Trigger Property="IsEnabled" Value="False"/>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="LightToggleButtonStyle" TargetType="{x:Type ToggleButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="StoryChecked">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="paletterect" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LControlStrokeFocused}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="StoryUnchecked">
							<ObjectAnimationUsingKeyFrames Storyboard.TargetName="paletterect" Storyboard.TargetProperty="Stroke">
								<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource LControlStrokeUnchecked}"/>
							</ObjectAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="MouseOver"/>
								<VisualState x:Name="Pressed"/>
								<VisualState x:Name="Disabled"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="CheckStates">
								<VisualState x:Name="Unchecked"/>
								<VisualState x:Name="Indeterminate"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="ValidationStates">
								<VisualState x:Name="InvalidFocused"/>
								<VisualState x:Name="InvalidUnfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Rectangle x:Name="paletterect" Fill="{TemplateBinding Background}" StrokeThickness="0.5" Stroke="#FF8D8D8D"/>
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="True">
							<Setter Property="Stroke" TargetName="paletterect" Value="{DynamicResource LControlStrokeUnchecked}"/>
						</Trigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Trigger.ExitActions>
								<StopStoryboard BeginStoryboardName="StoryChecked_BeginStoryboard"/>
							</Trigger.ExitActions>
							<Trigger.EnterActions>
								<BeginStoryboard x:Name="StoryChecked_BeginStoryboard" Storyboard="{StaticResource StoryChecked}"/>
							</Trigger.EnterActions>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>